package buy;

/**
 * 商品类
 * 
 * @author 马小萌
 * 
 */

public class Goods {

	/**
	 * 编号 数量 名字 产地 折扣 计数单位 价格
	 */

	int itemno, stockcount;

	String name, factoryaddr, discount, unit;

	double price;

	/**
	 * 无参构造
	 */

	public Goods() {
		super();
	}

	/**
	 * 带参构造
	 * 
	 * @param discount
	 *            折扣
	 * @param itemno
	 *            编号
	 * @param stockcount
	 *            数量
	 * @param unit
	 *            单位
	 * @param name
	 *            名字
	 * @param factoryaddr
	 *            产地
	 * @param price
	 *            价格
	 */

	public Goods(String discount, int itemno, int stockcount, String unit,
			String name, String factoryaddr, double price) {

		this.discount = discount;

		this.itemno = itemno;

		this.stockcount = stockcount;

		this.unit = unit;

		this.name = name;

		this.factoryaddr = factoryaddr;

		this.price = price;
	}

	/**
	 * 重写toString
	 */

	@Override
	public String toString() {
		return "Goods [itemno=" + itemno + ", stockcount=" + stockcount
				+ ", name=" + name + ", factoryaddr=" + factoryaddr
				+ ", discount=" + discount + ", unit=" + unit + ", price="
				+ price + "]";
	}

	/**
	 * 以下是getset方法
	 * 
	 * @return
	 */

	public int getItemno() {
		return itemno;
	}

	public void setItemno(int itemno) {
		this.itemno = itemno;
	}

	public int getStockcount() {
		return stockcount;
	}

	public void setStockcount(int stockcount) {
		this.stockcount = stockcount;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFactoryaddr() {
		return factoryaddr;
	}

	public void setFactoryaddr(String factoryaddr) {
		this.factoryaddr = factoryaddr;
	}

	public String getDiscount() {
		return discount;
	}

	public void setDiscount(String discount) {
		this.discount = discount;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

}
